Хочешь получить список файлов в папке? std::filesystem предоставляет удобные итераторы для обхода директории. Особенно полезно при создании загрузчиков ассетов, инструментов или скриптов, работающих с файлами.
✏️Решение:
1. заголовочный файл <filesystem> 2. Используй directory_iterator для обхода содержимого папки 3. Проверь тип объекта (файл, директория и т.д.), если нужно отфильтровать только файлы
#include <iostream> #include <filesystem>
namespace fs = std::filesystem;
int main() { std::string path = "."; // текущая директория
- Подключение <experimental/filesystem> вместо стандартного <filesystem> (устарело в C++17) - Отсутствие обработки исключений — доступ к некоторым директориям может быть запрещён
✅Совет:
- Добавь try-catch вокруг итератора, если работаешь с произвольными путями - Также удобно фильтровать файлы по расширению:
Хочешь получить список файлов в папке? std::filesystem предоставляет удобные итераторы для обхода директории. Особенно полезно при создании загрузчиков ассетов, инструментов или скриптов, работающих с файлами.
✏️Решение:
1. заголовочный файл <filesystem> 2. Используй directory_iterator для обхода содержимого папки 3. Проверь тип объекта (файл, директория и т.д.), если нужно отфильтровать только файлы
#include <iostream> #include <filesystem>
namespace fs = std::filesystem;
int main() { std::string path = "."; // текущая директория
- Подключение <experimental/filesystem> вместо стандартного <filesystem> (устарело в C++17) - Отсутствие обработки исключений — доступ к некоторым директориям может быть запрещён
✅Совет:
- Добавь try-catch вокруг итератора, если работаешь с произвольными путями - Также удобно фильтровать файлы по расширению:
Telegram auto-delete message, expiring invites, and more
elegram is updating its messaging app with options for auto-deleting messages, expiring invite links, and new unlimited groups, the company shared in a blog post. Much like Signal, Telegram received a burst of new users in the confusion over WhatsApp’s privacy policy and now the company is adopting features that were already part of its competitors’ apps, features which offer more security and privacy. Auto-deleting messages were already possible in Telegram’s encrypted Secret Chats, but this new update for iOS and Android adds the option to make messages disappear in any kind of chat. Auto-delete can be enabled inside of chats, and set to delete either 24 hours or seven days after messages are sent. Auto-delete won’t remove every message though; if a message was sent before the feature was turned on, it’ll stick around. Telegram’s competitors have had similar features: WhatsApp introduced a feature in 2020 and Signal has had disappearing messages since at least 2016.
How To Find Channels On Telegram?
There are multiple ways you can search for Telegram channels. One of the methods is really logical and you should all know it by now. We’re talking about using Telegram’s native search option. Make sure to download Telegram from the official website or update it to the latest version, using this link. Once you’ve installed Telegram, you can simply open the app and use the search bar. Tap on the magnifier icon and search for a channel that might interest you (e.g. Marvel comics). Even though this is the easiest method for searching Telegram channels, it isn’t the best one. This method is limited because it shows you only a couple of results per search.
Библиотека C C разработчика | cpp boost qt from cn